{extend name="public/base" /}
{block name="body"}
<div class="ibox float-e-margins">
<div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="{:url('index/index')}"><i class="fa fa-home"></i></a>
		</li>
		<li><strong>抽奖交友团列表</strong></li>
	</ol>
</div>
	<div class="ibox-content">
		<div class="row">
			<div class="col-sm-12">
				<div class="col-sm-2">
					<div class="input-group">
						<a href="{:url('add')}" class="btn btn-primary btn-outline">发布活动</a>
					</div>
				</div>
			</div>
		</div>
		<form id="myForm" class="form-horizontal m-t" method="post" action="{:url('index')}">
	 		<div class="form-group">
              	<label class="col-sm-1 control-label">商品名称</label>
				<div class="col-sm-5 input-group">
                    <div class="input-group">
                        <input type="text" name="goodsname" placeholder="请输入商品名称" class="input-sm form-control"> <span class="input-group-btn">
                            <button type="submit" class="btn btn-sm btn-primary"> 搜索</button> </span>
                    </div>
                </div>
            </div>
        </form>
		<div class="hr-line-dashed"></div>
            <div class="example-wrap">
                <div class="example">
                    <table class="table table-bordered table-hover">
                        <thead>
                            <tr class="long-tr">
                            	<th>商品图片</th>
                                <th>商品名称</th>
                                <th>商品价格</th>
								<th>排序</th>
                                <th>添加时间</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody id="list">
                        	{volist name="list" id='ad'}
                        	<tr>
                        		<td><img src="{$ad.thumb}" width="50px"/></td>
                        		<td>{$ad.name}</td>
                        		<td>{$ad.current_price}</td>
                        		<td>{$ad.sort}</td>
                        		<td>{$ad.add_time}</td>
                        		<td>	
                        			<a href="{:url('edit',['id'=>$ad.id])}" class="btn btn-primary bnt-sm">
										<i class="fa fa-paste"></i> 编辑</a>&nbsp;&nbsp;
										{if condition="$ad.goods_state == 3 || $ad.goods_state == 2"}
										<a href="{:url('offshelf',['id'=>$ad.id,'goods_state'=>$goods_state])}" class="btn btn-danger bnt-sm ajax-do">
										<i class="fa fa-cart-arrow-down"></i> 下架</a>
										{/if}
                        		</td>
                        	</tr>
                        	{/volist}
                        </tbody>
                    </table>
                    <div style="text-align: right;">
                      {$list->render()}
                    </div>
                </div>
            </div>
            </div>
</div>
{/block} {block name="script"}
<script src="__JS__/jquery.form.js"></script>
<script src="__LIB__/validate/jquery.validate.min.js"></script>
<script src="__LIB__/validate/messages_zh.min.js"></script>
<script src="__LIB__/validate/add_validate.min.js"></script>
<script src="__LIB__/fileinput/js/fileinput.min.js"></script>
<script src="__LIB__/fileinput/js/locales/zh.js"></script>
<script>
</script>
{/block}